#pragma once

#include <vector>
class CMap;
class CNode;
class CPlayer;

class CAi
{

private:


	//pointer to map... duh!
	CMap* map;

	//databases for AI desicion making
	std::vector<CNode*> NodesOwnd;
	std::vector<CNode*> Nodesplayer;
	std::vector<CNode*> NodesAvailiable;

	// Pointer to player
	CPlayer* player;

	//pointer to node that the AI has chosen
	CNode* chosen;

	//pointer to node that the player is at.
	CNode* playerat;

	//limiter for the ai to capture positions
	float capturerate;
	float totaltime;

	//reference points for the AI's objectives
	CNode* target;
	CNode* Home;



	//desicion functions
	void MakeDec();

	//if all else cant be determined
	void RandomChoice();
	//capture player node
	void goforthethroat();
	//player is in AI node... cut him off
	void youlittleprick();
	//try to kick the player out
	void igotyou();


public:

	CAi();

	void SetMap(CMap* themap);
	void SetTartget(CNode* thetarget);
	void SetHome(CNode* thehome);
	void Update(float fElapsedTime);
	void Render();

	float GetRate() {return capturerate;}
	CNode* GetTarget() { if(target) return target; else 
		return false; }

	CNode* GetChosen() { if(chosen) return chosen; else
		return false;}

	void SetRate(float rate){capturerate = rate;} 
	void killai();



};










